export class RpcResult {
	constructor(result: boolean);
	constructor(result: boolean, data: { [key: string]: any });
	constructor(message: string | null);
	constructor(error: Error);
	constructor(result: boolean, data: { [key: string]: any }, message: string | null);
	constructor(result: boolean | Error | string | null, data: { [key: string]: any } = {}, message: string | null = null) {
	  if (result instanceof Error) {
		this.result = false;
		this.data = {};
		this.message = result.message;
	  } else if (typeof result === "boolean") {
		this.result = result;
		this.data = data;
		this.message = message;
	  } else {
		this.result = false;
		this.data = {};
		this.message = result;
	  }
	}
	public result: boolean;
	public data: { [key: string]: any };
	public message: string | null;
  }